package kr.hkit.powerjava.chther07;

public class StringTest {
	public static void main(String[] args) {
		String str = "Hello java";
		String str2 = "MySQL";
		String str3 = "mysql";

		try {
			char ch = str.charAt(9);
			System.out.println(ch);

			System.out.println(str.compareTo(str2) == 0 ? "같음" : str
					.compareTo(str2));

			System.out.println(str.concat(str2));

			System.out.println(str2.equals(str3) ? "같음" : "다름");

			System.out.println(str2.equalsIgnoreCase(str3) ? "같음" : "다름");

			System.out.println("".isEmpty());

			System.out.println(str.length());

			
			System.out.println(str.replace('l', 'L'));

			for (int i = 0; i < str2.length(); i++) {
				System.out.println(str.charAt(i));
			}
			
			System.out.println(str.substring(6, 8));
			
			System.out.println(str.toUpperCase());
			System.out.println(str.toLowerCase());
			
			String str4 = str+str2+str3;
			
			System.out.println(str4);
			
		} catch (IndexOutOfBoundsException e) {
			System.out.println("ㄴㄴ");
		}

	}

}

// try{
//
// }catch(오류명 e){
// 예외
// }
